﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TheAPI.Data
{
    public class RuneSlot
    {
        public override bool Equals(object obj)
        {
            var other = obj as RuneSlot;
            return other != null && other.RuneSlotId == RuneSlotId && Rune.Equals(other.Rune);
        }

        public override int GetHashCode()
        {
            return RuneSlotId.GetHashCode() + Rune.GetHashCode();
        }

        /// <summary>
        /// Rune associated with the rune slot
        /// </summary>
        [JsonProperty("rune")]
        public Rune Rune { get; set; }

        /// <summary>
        /// Rune slot ID
        /// </summary>
        [JsonProperty("runeSlotId")]
        public int RuneSlotId { get; set; }
    }
}
